<div class="title"><span>我的关注</span></div>
  <div class="pg_follow w670">
    <table class="table table-striped">
      <tbody>
        <!--{iCMS:user:follow loop="true" page="true" row="10" userid="$user.uid"}-->
        <tr id="id-<!--{$user_follow.uid}-->">
          <td class="avatar_35"><a title="<!--{$user_follow.name}-->" href="<!--{$user_follow.url}-->">
              <img class="iCMS_user_avatar avatar_35" data-tip="iCMS:ucard:<!--{$user_follow.uid}-->" src="<!--{$user_follow.avatar}-->" onerror="iCMS.user.noavatar(this);">
            </a></td>
          <td><div class="info"> <span class="label"><!--{$user_follow.name}--></span> </div></td>
          <td class="span2"><div data-param='{"uid":"<!--{$user_follow.uid}-->","name":"<!--{$user_follow.name}-->"}'> <a href="javascript:;" data-param='{"follow":"1"}' class="btn_follow"><i class="fa fa-check"></i> 已关注，取消</a> </div></td>
        </tr>
        <!--{iCMSelse}-->
        <tr>
          <td><i class="fa fa-ban"></i> 暂无关注</td>
        </tr>
        <!--{/iCMS}-->
      </tbody>
      <tfoot>
        <tr>
          <td colspan="3"><div class="iCMS_pagination"><!--{$iCMS.PAGE.NAV}--></div></td>
        </tr>
      </tfoot>
    </table>
  </div>
  <script>
	var al = $(".avatar_list");
	$("li", al).each(function() {
		var a = $(this);
		a.hover(function() {
			$(".label",a).hide();
			$(".btn_follow",a).css('display','block');
		}, function() {
		    setTimeout(function() {
		    	$(".label",a).show();
		        $(".btn_follow",a).hide();
		    }, 3000);
		});
	});
	$(".btn_follow").click(function(event) {
		event.preventDefault();
		var $this = $(this);
	    iCMS.user.follow(this,function(c,param){
			if (c.code) {
				$("#id-"+param.uid).hide('500',function() {
					$this.remove();
				});
			}else{
				iCMS.alert(c.msg);
			}
	    });
	});
</script>

